package com.hc.model.code02.test2;

/**
 * @version v1.0
 * @ClassName: Singleton
 * @Description: 通过静态待模块构造对象（饿汉式）
 * @Author: HC
 */
public class Singleton {

    // 私有化
    private Singleton() {}

    private static Singleton instances;

    // 静态代码块
    static {
        instances = new Singleton();
    }

    public static Singleton getInstances() {
        return instances;
    }
}
